package com.constant;

import cn.hutool.core.collection.CollUtil;
import org.springframework.http.MediaType;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 财务车企通用常量
 *
 * @author lb
 */
public class CarConstants {
    
    /**
     * A String equivalent of {@link MediaType#APPLICATION_JSON_UTF8}.
     */
    public final static String APPLICATION_JSON_UTF8_VALUE = "application/json;charset=UTF-8";
    
    /**
     * news系统 
     * APP_ID、APP_SECRET
     */
    public static final String APP_SECRET_NEWS = "hrlLLGEaShHP6yE72he1l45T8jj7SVuU";
    public static final String APP_ID_NEWS = "finance";
    
    /**
     * 合并单 
     * 单据类型
     */
    public static final Map<String, String> MERGER_ORDER_TYPE_MAP;
    /**
     * 明细单 
     * 单据类型
     */
    public static final Map<String, String> DETAIL_ORDER_TYPE_MAP;
    static {
        MERGER_ORDER_TYPE_MAP = new HashMap<String, String>();
        MERGER_ORDER_TYPE_MAP.put("10", "车企合并单");
        MERGER_ORDER_TYPE_MAP.put("20", "增项单");
        MERGER_ORDER_TYPE_MAP.put("30", "激励单");

        DETAIL_ORDER_TYPE_MAP = new HashMap<String, String>();
        DETAIL_ORDER_TYPE_MAP.put("10", "工单");
        DETAIL_ORDER_TYPE_MAP.put("20", "激励单");
    }

    /**
     * 合并单 
     * 单据类型集合
     */    
    public static List<String> MERGER_ORDER_TYPE = CollUtil.newArrayList("10",
            "20",
            "30");
    /**
     * 合并单 
     * 支持文件的格式 todo 小写
     */
    public static List<String> FILE_FORMAT = CollUtil.newArrayList("jpg",
            "jpeg",
            "png",
            "bmp",
            "gif",
            "pdf");

    public static List<String> FILE_PDF = CollUtil.newArrayList(
            "pdf");

    /**
     * 压缩包 todo 小写
     */
    public static String FILE_FORMAT_ZIP = "zip";

    /**
     * 合并单 单据类型
     * 10-车企合并单类型、20-增项单类型、30-激励单类型
     */
    public static final String CAR_ORDER_TYPE = "10";
    public static final String ADD_ORDER_TYPE = "20";
    public static final String ENCOURAGE_ORDER_TYPE = "30";
    /**
     * 合并明细单 单据类型
     * 10-工单、20-激励单
     */
    public static final String MERGER_DETAIL_WORK_ORDER_TYPE = "10";
    public static final String MERGER_DETAIL_ENCOURAGE_ORDER_TYPE = "20";
    /**
     * 财务特殊标记
     *  10-正常流程 20-跳过开票  30跳过开票及记收
     */
    public static final String SPECIAL_FLAG_NORMAL = "10";
    public static final String SPECIAL_FLAG_SKIP_INVOICING = "20";
    public static final String SPECIAL_FLAG_SKIP_INVOICING_COLLECTION = "30";
    /**
     * 财务流程
     *  10-未收款记帐，20-未开票，30-开票中，40-已开票，50-记收暂估完成
     */
    public static final String FINANCE_PROCESS_UNCOLLECTED_BOOKKEEPING = "10";
    public static final String FINANCE_PROCESS_UNINVOICED = "20";
    public static final String FINANCE_PROCESS_INVOICING = "30";
    public static final String FINANCE_PROCESS_INVOICED = "40";
    public static final String FINANCE_PROCESS_COLLECTION_OK = "50";
    /**
     * 回款状态
     *  10-未回款  20已回款完成
     */
    public static final String COLLECTION_STATUS_UNCOLLECTED = "10";
    public static final String COLLECTION_STATUS_COLLECTION_OK = "20";
    /**
     * 审核状态 
     * 20-待审核 30-审核通过 40-审核拒绝 10-无需审核
     */
    public static final String AUDIT_STATUS_WAIT_AUDIT = "20";
    public static final String AUDIT_STATUS_AUDIT_OK = "30";
    public static final String AUDIT_STATUS_AUDIT_NO = "40";
    public static final String AUDIT_STATUS_NOT_AUDIT = "10";
    /**
     * 财务流程状态
     * -1-待接收暂估数据 0-初始 1-财务流程开始
     */
    public static final String FNC_STATUS_WAIT_RECEIVE = "-1";
    public static final String FNC_STATUS_INITIAL = "0";
    public static final String FNC_STATUS_PROCESS_START = "1";
    /**
     * 发票类型
     * 3-电票、0-增值税专票
     */
    public static final String INVOICE_TYPE_ELECTRON = "3";
    public static final String INVOICE_TYPE_VAT = "0";
    /**
     * 抬头类型
     * 0-个人 1-企业
     */
    public static final String HEADER_TYPE_INDIVIDUAL = "0";
    public static final String HEADER_TYPE_ENTERPRISE = "1";
    /**
     * 服务调度平台
     * 调用SAP系统相关参数
     */
    public static String APPLICATION_KEY = "bfd43f20e6021694fe2ec184e6d4cd86";// 系统编码
    public static String APPLICATION_SECRET = "77c014b14dae0c8c2472ac653e763ff8";// 系统密钥
    /**
     * 记账公司
     * 0RK0、0LC0
     */
    public final static String COMPANY_CODE_0RK0 = "0RK0";
    public final static String COMPANY_CODE_0LC0 = "0LC0";

    /**
     * 业务模式
     * 收款  C16 
     * 发票记账（收入） C18-车企   F06-增项
     * 暂估成本 C26-车企  F58-增项   C84-正激励  C27-负激励
     */
    public final static String YWMS_C16 = "C16";//收款
    public final static String YWMS_C18 = "C18";//收入 车企
    public final static String YWMS_F06 = "F06";//收入 增项
    public final static String YWMS_C26 = "C26";//暂估 车企
    public final static String YWMS_F58 = "F58";//暂估 增项
    public final static String YWMS_C84 = "C84";//暂估 正激励
    public final static String YWMS_C27 = "C27";//暂估 负激励
}
